package giit.computerbase.util;

/**
 * User: tum0r
 * Package Name: giit.computerbase.util
 * Time: 2018-11-29 Thursday 15:44:43
 */
public class DealWithCharcter {
    public static String dealWith(String text) {
        String result = new String(text);
        result = result.replace("&", "&amp;");
        result = result.replace(" ", "&nbsp;");
        result = result.replace("<", "&lt;");
        result = result.replace(">", "&gt;");
        result = result.replace("\"", "&quot;");
        result = result.replace("'", "&apos;");
        result = result.replace("\r\n", "<br>");
        result = result.replace("\r", "<br>");
        result = result.replace("\n", "<br>");
        return result;
    }
}
